package com.laiketui.domain.weixin;

import com.google.gson.GsonBuilder;
import net.coobird.thumbnailator.filters.Watermark;

import java.io.Serializable;

public class WxMaPhoneNumberInfo implements Serializable {
    private static final long serialVersionUID = 6719822331555402137L;
    private String phoneNumber;
    private String purePhoneNumber;
    private String countryCode;
    private Watermark watermark;

    public static WxMaPhoneNumberInfo fromJson(String json) {
        GsonBuilder gsonBuilder = new GsonBuilder();
        return (WxMaPhoneNumberInfo) gsonBuilder.create().fromJson(json, WxMaPhoneNumberInfo.class);
    }

    public WxMaPhoneNumberInfo() {
    }

    public String getPhoneNumber() {
        return this.phoneNumber;
    }

    public String getPurePhoneNumber() {
        return this.purePhoneNumber;
    }

    public String getCountryCode() {
        return this.countryCode;
    }

    public Watermark getWatermark() {
        return this.watermark;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public void setPurePhoneNumber(String purePhoneNumber) {
        this.purePhoneNumber = purePhoneNumber;
    }

    public void setCountryCode(String countryCode) {
        this.countryCode = countryCode;
    }

    public void setWatermark(Watermark watermark) {
        this.watermark = watermark;
    }

    @Override
    public boolean equals(Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof WxMaPhoneNumberInfo)) {
            return false;
        } else {
            WxMaPhoneNumberInfo other = (WxMaPhoneNumberInfo)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label59: {
                    Object this$phoneNumber = this.getPhoneNumber();
                    Object other$phoneNumber = other.getPhoneNumber();
                    if (this$phoneNumber == null) {
                        if (other$phoneNumber == null) {
                            break label59;
                        }
                    } else if (this$phoneNumber.equals(other$phoneNumber)) {
                        break label59;
                    }

                    return false;
                }

                Object this$purePhoneNumber = this.getPurePhoneNumber();
                Object other$purePhoneNumber = other.getPurePhoneNumber();
                if (this$purePhoneNumber == null) {
                    if (other$purePhoneNumber != null) {
                        return false;
                    }
                } else if (!this$purePhoneNumber.equals(other$purePhoneNumber)) {
                    return false;
                }

                Object this$countryCode = this.getCountryCode();
                Object other$countryCode = other.getCountryCode();
                if (this$countryCode == null) {
                    if (other$countryCode != null) {
                        return false;
                    }
                } else if (!this$countryCode.equals(other$countryCode)) {
                    return false;
                }

                Object this$watermark = this.getWatermark();
                Object other$watermark = other.getWatermark();
                if (this$watermark == null) {
                    if (other$watermark != null) {
                        return false;
                    }
                } else if (!this$watermark.equals(other$watermark)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(Object other) {
        return other instanceof WxMaPhoneNumberInfo;
    }

    @Override
    public int hashCode() {
        int result = 1;
        Object $phoneNumber = this.getPhoneNumber();
        result = result * 59 + ($phoneNumber == null ? 43 : $phoneNumber.hashCode());
        Object $purePhoneNumber = this.getPurePhoneNumber();
        result = result * 59 + ($purePhoneNumber == null ? 43 : $purePhoneNumber.hashCode());
        Object $countryCode = this.getCountryCode();
        result = result * 59 + ($countryCode == null ? 43 : $countryCode.hashCode());
        Object $watermark = this.getWatermark();
        result = result * 59 + ($watermark == null ? 43 : $watermark.hashCode());
        return result;
    }

    @Override
    public String toString() {
        return "WxMaPhoneNumberInfo(phoneNumber=" + this.getPhoneNumber() + ", purePhoneNumber=" + this.getPurePhoneNumber() + ", countryCode=" + this.getCountryCode() + ", watermark=" + this.getWatermark() + ")";
    }
}

